funtion transformDetail(item,allResArr){
    let str = ''
    var resourcesReg = /\[(.+?)\]/g
    var arr = item.match(resourcesReg)
    console.log('arrxinxi')
    console.log(allResArr)
    console.log(item)
    console.log(arr)
    let resArr = []
    let strTop = ''
    str = item
    if(arr!=null){
      for(let i=0;i<allResArr.length;i++){
        for(let j=0;j<arr.length;j++){
          let exactRes = arr[j].substr(1,arr[j].length-2)
          if(exactRes == allResArr[i].title){
            let mediaType = ''
            let widthValue = 'undefined'
            let heightValue = "undefined"
            let num = allResArr[i].contents[0].number
            if(allResArr[i].mediaType == "audio/mp3"){
                mediaType = 'audio'
            }else if(allResArr[i].mediaType == "video/mp4"){
                mediaType = 'video'
            }else if(allResArr[i].mediaType == "image/gif" || allResArr[i].mediaType == "image/jpeg" || allResArr[i].mediaType == "image/svg+xml" || allResArr[i].mediaType == "image/png"){
                mediaType = 'img'
            }
            strTop = "&nbsp;!{mediaType="+mediaType+",id="+allResArr[i].id+",alt="+mediaType+",version="+allResArr[i].version.serial+",width="+widthValue+"px,height="+heightValue+"px,num="+num+"}&nbsp;"
            var e = eval('/(\\'+ arr[j] +'\)/g'); 
            console.log(e)
              str = str.replace(e,strTop);
          }
        }
      }
    }else{
      str = item
    }
    console.log('题目转化的return')
    console.log(str)
    return str
  }